package wdb

var (
	defaultDB = "wuiDB"
	//路径
	path = "./db/"
	//数据库名称
	databases = []string{}
	//cache db
	cache = "w_cache"
)

type Setting struct {
	Path      string
	Databases []string
}

func Init(setting Setting) {
	if setting.Path == "" {
		path = "./db/"
	} else {
		path = setting.Path
	}
	if len(setting.Databases) == 0 {
		databases = append(databases, defaultDB)
	} else {
		databases = setting.Databases
	}
	databases = append(databases, cache)
	__init()
}
